package com.agg.persist.xml.context;



import com.agg.core.base.dto.BaseDTO;
import com.agg.persist.xml.mapping.EntityMapper;

import java.util.Map;

public class EntityContextPayload extends BaseDTO {

    //实体
    private Map entityMap;

    /**
     * 映射结构
     */
    private EntityMapper entityMapper;



    public EntityContextPayload() {
    }

    public static class EntityContextPayloadBuilder {
        //实体
        private Map entityMap;

        /**
         * 映射结构
         */
        private EntityMapper entityMapper;


        public EntityContextPayload build() {
            return new EntityContextPayload(this.entityMap,this.entityMapper);
        }

        public EntityContextPayloadBuilder entityMapper(EntityMapper entityMapper) {
            this.entityMapper = entityMapper;
            return this;
        }

        public EntityContextPayloadBuilder entityMap(Map entityMap) {
            this.entityMap = entityMap;
            return this;
        }


    }

    public static EntityContextPayloadBuilder builder() {
        return new EntityContextPayloadBuilder();
    }

    public EntityContextPayload(Map entityMap, EntityMapper entityMapper) {
        this.entityMap = entityMap;
        this.entityMapper = entityMapper;

    }

    public Map getEntityMap() {
        return entityMap;
    }

    public void setEntityMap(Map entityMap) {
        this.entityMap = entityMap;
    }

    public EntityMapper getEntityMapper() {
        return entityMapper;
    }

    public void setEntityMapper(EntityMapper entityMapper) {
        this.entityMapper = entityMapper;
    }
}
